import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
        path: '/',
        redirect: '/home',
        component: () =>
            import ('@/views/layout'),
        meta: {
            keepAlive: false,

        },
        children: [{
                path: '',
                component: () =>
                    import ('../views/FirstPage/index.vue'),
                meta: {
                    showTabbar: true,
                    keepAlive: false,
                }
            },
            {
                path: '/home',
                name: 'home',
                component: () =>
                    import ('../views/FirstPage/index.vue'),
                meta: {
                    showTabbar: true,
                    keepAlive: false,
                }
            },
            {
                path: '/illness',
                name: 'illness',
                component: () =>
                    import ('../views/Home.vue'),
                meta: {
                    showTabbar: true,
                    keepAlive: false,
                }
            },
            {
                path: '/search',
                name: 'search',
                component: () =>
                    import ('@/views/search'),
                meta: {
                    showTabbar: true,
                    keepAlive: false,
                }
            },
            {
                path: '/message',
                name: 'message',
                component: () =>
                    import ('@/views/message'),
                meta: {
                    showTabbar: true,
                    keepAlive: false,
                }
            },
            {
                path: '/my',
                name: 'my',
                component: () =>
                    import ('@/views/my'),
                meta: {
                    showTabbar: true,
                    keepAlive: false,
                }
            }
        ]
    },
    {
        path: '/feiaiGroup/:id',
        name: "feiaiGroup",
        component: () =>
            import ('../views/binglizu.vue'),
        meta: {
            keepAlive: false,
        }
    },
    {
        path: '/patient/:id',
        name: 'patient',
        component: () =>
            import ('../views/patient/index.vue'),
        meta: {
            keepAlive: false,
        }
    },
    {
        path: '/groupManager',
        name: 'groupManager',
        component: () =>
            import ('../views/patient/components/groupManage.vue'),
        meta: {
            keepAlive: false,

        }
    },
    {
        path: '/demo',
        name: 'demo',
        component: () =>
            import ('../views/demo.vue'),
        meta: {
            keepAlive: false,
        }
    },


]

const router = new VueRouter({
    routes,
})

export default router